***-----------------------------------------------------------------------------------------------------------------------------------------------------
*** SETTINGS AND FILE PATHS 
***-----------------------------------------------------------------------------------------------------------------------------------------------------
clear all
version 10
set matsize 11000
set maxvar 30000
set more off
set seed 26688571 
set scheme burd 

	global data "../Data"
	global graphs "../Graphs"
	global tables "../Tables"

	
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%
*%%% 0. PACKAGES
*%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	
	
	capt prog drop setup_proj
	program setup_proj

		* *** Add required packages from SSC to this list ***
		local ssc_packages "estout" "coefplot" "ivreg2" "spmap" "reghdfe" "event_plot" "did_multiplegt" "drdid" "csdid" "eventstudyinteract" "heatplot" "bacondecomp"
		* *** Add required packages from SSC to this list ***

		* Install packages from SSC
		
		   if !missing("`ssc_packages'") {
			   
			   foreach pkg in "`ssc_packages'" {
					
					dis "Installing `pkg'"
					qui ssc install `pkg', replace
				
				}
			
			}
			
		* Install packages using net
			
			qui net install scheme-burd.pkg, from(http://fmwww.bc.edu/RePEc/bocode/s)
			
	end

	
	setup_proj
	
	*/
	
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%
*%%% 1. GLOBALS
*%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	global mr_per "1000"
	
	global xaxis_start "xlabel(-6(1)7)"
	global xaxis_comp  "xlabel(-6(1)4)"

	global yaxis_imr "ylabel(-2(2)6,nogrid)"
	global yaxis_u5mr "ylabel(-0.5(0.5)1.5,nogrid)"

	global yaxis_imr2 "ylabel(-2(2)4,nogrid)"
	global yaxis_u5mr2 "ylabel(-0.5(0.5)1,nogrid)"


	global yaxis_imr_comp "ylabel(-6(2)6,nogrid)"
	global yaxis_u5mr_comp "ylabel(-1.5(0.5)1.5,nogrid)"
	
	exit

*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%
*%%% 2. REPLICATION CODE
*%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%	

*0) PROGRAMS

do 0_programs.do

*1) SET-UP VITAL STATISTICS

do 1_vitalstats.do

*2) SET UP DISTRICT-LEVEL DATA

do 2_district.do

*3) SET UP PROJECT DATA

do 3_projects.do

*4) SET UP FINAL DATASET

do 4_setup.do

*5) Main analysis
do 5_analysis.do

exit

*6) Appendix
do 6_appendix.do




